home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ntkb.zip / NTKB.EXE / Q100 / 1 / 08.TXT next >
Text File  |  1993-09-08  |  16KB  |  385 lines

  1. DOCUMENT:Q100108  01-SEP-1993  [W_NT]
  2. TITLE   :INF: Overview of FAT, HPFS, and NTFS File Systems
  3. PRODUCT :Windows NT
  4. PROD/VER:3.10
  5. OPER/SYS:WINDOWS
  6. KEYWORDS:
  7.  
  8. ---------------------------------------------------------------
  9. The following information applies to:
  10.  
  11.  - Microsoft Windows NT operating system version 3.1
  12.  - Microsoft Windows NT Advanced Server version 3.1
  13. ---------------------------------------------------------------
  14.  
  15. Summary:
  16.  
  17. This article explains the differences between FAT, HPFS, and NTFS
  18. under Windows NT, and their advantages and disadvantages. It is
  19. divided into the following sections:
  20.  
  21.  - FAT Overview
  22.  - HPFS Overview
  23.  - NTFS Overview
  24.  
  25. FAT Overview
  26. ============
  27.  
  28. FAT is by far the most simplistic of the file systems supported by
  29. Windows NT. The FAT file system is characterized by the file
  30. allocation table (FAT), which is really a table that resides at the
  31. very "top" of the volume. To protect the volume, two copies of the FAT
  32. are kept in case one becomes damaged. In addition, the FAT tables and
  33. the root directory must be stored in a fixed location so that the
  34. system's boot files can be correctly located.
  35.  
  36. A disk formatted with FAT is allocated in clusters, whose size are
  37. determined by the size of the volume. When a file is created, an entry
  38. is created in the directory and the first cluster number containing
  39. data is established. This entry in the FAT table either indicates that
  40. this is the last cluster of the file, or points to the next cluster.
  41.  
  42. Updating the FAT table is very important as well as time consuming. If
  43. the FAT table is not regularly updated, it can lead to data loss. It
  44. is time consuming because the disk read heads must be repositioned to
  45. the drive's logical track zero each time the FAT table is updated.
  46.  
  47. There is no organization to the FAT directory structure, and files are
  48. given the first open location on the drive. In addition, FAT supports
  49. only read-only, hidden, system, and archive file attributes.
  50.  
  51. FAT Naming Convention
  52. ---------------------
  53.  
  54. FAT uses the traditional 8.3 file naming convention and all filenames
  55. must be created with the ASCII character set. The name of a file or
  56. directory can be up to eight characters long, then a period (.)
  57. separator, and up to a three character extension. The name must start
  58. with either a letter or number and can contain any characters except
  59. for the following:
  60.  
  61.    . " / \ [ ] : ; | = ,
  62.  
  63. If any of these characters are used, unexpected results may occur. The
  64. name cannot contain any spaces.
  65.  
  66. The following names are reserved:
  67.  
  68.    CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL
  69.  
  70. All characters will be converted to uppercase.
  71.  
  72. Advantages of FAT
  73. -----------------
  74.  
  75. It is not possible to perform an undelete under Windows NT on any of
  76. the supported file systems. Undelete utilities try to directly access
  77. the hardware, which cannot be done under Windows NT. However, if the
  78. file was located on a FAT partition, and the system is restarted under
  79. MS-DOS, the file can be undeleted. The FAT file system is best for
  80. drives and/or partitions under approximately 200 MB, because FAT
  81. starts out with very little overhead. For further discussion of 
  82. FAT advantages, see the following: 
  83.  
  84.  - Windows NT "System Guide," Chapter 18, section titled "Selecting a
  85.    File System for the Windows NT Partition"
  86.  
  87.  - Windows NT Advanced Server "System Guide," Chapter 20, section
  88.    titled "Selecting a File System for the Windows NT Partition"
  89.  
  90.  - Windows NT Advanced Server "Concepts and Planning Guide," Chapter
  91.    5, section titled "Choosing a File System"
  92.  
  93. Disadvantages of FAT
  94. --------------------
  95.  
  96. Preferably, when using drives or partitions of over 200 MB the FAT
  97. file system should not be used. This is because as the size of the
  98. volume increases, performance with FAT will quickly decrease. It is
  99. not possible to set permissions on files that are FAT partitions. For
  100. further discussion of other disadvantages of FAT, see the following:
  101.  
  102.  - Windows NT "System Guide," Chapter 18, section titled "Selecting a
  103.    File System for the Windows NT Partition"
  104.  
  105.  - Windows NT Advanced Server "System Guide," Chapter 20, section
  106.    titled "Selecting a File System for the Windows
  107.    NT Partition"
  108.  
  109.  - Windows NT Advanced Server "Concepts and Planning Guide," Chapter
  110.    5, section titled "Choosing a File System" 
  111.  
  112. HPFS Overview
  113. =============
  114.  
  115. The HPFS file system was first introduced with OS/2 1.2 to allow for
  116. greater access to the larger hard drives that were then appearing on
  117. the market. Additionally, it was necessary for a new file system to
  118. extend the naming system, organization, and security for the growing
  119. demands of the network server market. HPFS maintains the directory
  120. organization of FAT, but adds automatic sorting of the directory based
  121. on filenames. Filenames are extended to up to 254 double byte
  122. characters. HPFS also allows a file to be composed of "data" and
  123. special attributes to allow for increased flexibility in terms of
  124. supporting other naming conventions and security. In addition, the
  125. unit of allocation is changed from clusters to physical sectors (512
  126. bytes), which reduces lost disk space.
  127.  
  128. Under HPFS, directory entries hold more information than under FAT. As
  129. well as the attribute file, this includes information about the
  130. modification, creation, and access date and times. Instead of pointing
  131. to the first cluster of the file, the directory entries under HPFS
  132. point to the FNODE. The FNODE can contain the file's data, or pointers
  133. that may point to the file's data or to other structures that will
  134. eventually point to the file's data.
  135.  
  136. HPFS attempts to allocate as much of a file in contiguous sectors as
  137. possible. This is done in order to increase speed when doing
  138. sequential processing of a file.
  139.  
  140. HPFS organizes a drive into a series of 8 MB bands, and whenever
  141. possible a file is contained within one of these bands. Between each
  142. of these bands are 2K allocation bitmaps, which keep track of which
  143. sectors within a band have and have not been allocated. Banding
  144. increases performance because the drive head does not have to return
  145. to the logical top (typically cylinder 0) of the disk, but to the
  146. nearest band allocation bitmap to determine where a file is to be
  147. stored.
  148.  
  149. Additionally, HPFS includes a couple of unique special data objects:
  150.  
  151. Super Block
  152. -----------
  153.  
  154. The Super Block is located in logical sector 16 and contains a pointer
  155. to the FNODE of the root directory. One of the biggest dangers of
  156. using HPFS is that if the Super Block is lost or corrupted due to a
  157. bad sector, so are the contents of the partition, even if the rest of
  158. the drive is fine. It would be possible to recover the data on the
  159. drive by copying everything to another drive with a good sector 16 and
  160. rebuilding the Super Block. However, this is a very complex task.
  161.  
  162. Spare Block
  163. -----------
  164.  
  165. The Spare Block is located in logical sector 17 and contains a table
  166. of "hot fixes" and the Spare Directory Block. Under HPFS, when a bad
  167. sector is detected, the "hot fixes" entry is used to logically point
  168. to an existing good sector in place of the bad sector. This technique
  169. for handling write errors is known as hot fixing.
  170.  
  171. Hot fixing is a technique where if an error occurs because of a bad
  172. sector, the file system moves the information to a different sector
  173. and marks the original sector as bad. This is all done transparent to
  174. any applications that are performing disk I/O (that is, the
  175. application never knows that there were any problems with the hard
  176. drive). Using a file system that supports hot fixing will eliminate
  177. error messages such as the FAT "Abort, Retry, or Fail?" error message
  178. that occurs when a bad sector is encountered.
  179.  
  180. Note: The version of HPFS that is included with Windows NT does not
  181. support hot fixing.
  182.  
  183. Advantages of HPFS
  184. ------------------
  185.  
  186. HPFS is best for drives in the 200-400 MB range. For more discussion
  187. of the advantages of HPFS, see the following:
  188.  
  189.  - Windows NT "System Guide," Chapter 18, section titled "Selecting a
  190.    File System for the Windows NT Partition"
  191.  
  192.  - Windows NT Advanced Server "System Guide," Chapter 20, section
  193.    titled "Selecting a File System for the Windows NT Partition"
  194.  
  195.  - Windows NT Advanced Server "Concepts and Planning Guide," Chapter
  196.    5, section titled "Choosing a File System"
  197.  
  198. Disadvantages of HPFS
  199. ---------------------
  200.  
  201. Because of the overhead involved in HPFS, it is not a very efficient
  202. choice for a volume of under approximately 200 MB. In addition, with
  203. volumes larger than about 400 MB, there will be some performance
  204. degradation. You cannot set security on HPFS under Windows NT. For
  205. additional disadvantages of HPFS, see the following: 
  206.  
  207.  - Windows NT "System Guide," Chapter 18, section titled "Selecting a
  208.    File System for the Windows NT Partition"
  209.  
  210.  - Windows NT Advanced Server "System Guide," Chapter 20, section
  211.    titled "Selecting a File System for the Windows NT Partition" 
  212.  
  213.  - Windows NT Advanced Server "Concepts and Planning Guide," Chapter
  214.    5, section titled "Choosing a File System" 
  215.  
  216. NTFS Overview
  217. =============
  218.  
  219. From a user's point of view, NTFS continues to organize files into
  220. directories, which, like HPFS, are sorted. However, unlike FAT or
  221. HPFS, there are no "special" objects on the disk and there is no
  222. dependence on the underlying hardware, such as 512 byte sectors. In
  223. addition, there are no special locations on the disk, such as FAT
  224. tables or HPFS Super Blocks.
  225.  
  226. The goals of NTFS are to provide:
  227.  
  228.  - Reliability, which is especially desirable for high end systems
  229.    and file servers
  230.  
  231.  - A platform for added functionality
  232.  
  233.  - Support POSIX requirements
  234.  
  235.  - Removal of the limitations of the FAT and HPFS file systems
  236.  
  237. Reliability
  238. -----------
  239.  
  240. To ensure reliability of NTFS, three major areas were addressed:
  241. recoverability, removal of fatal single sector failures, and hot
  242. fixing.
  243.  
  244. NTFS is a recoverable file system because it keeps track of
  245. transactions against the file system. When a CHKDSK is performed on
  246. FAT or HPFS, the consistency of pointers within the directory,
  247. allocation, and file tables is being checked. Under NTFS, a log of
  248. transactions against these components is maintained so that CHKDSK
  249. need only roll back transactions to the last commit point in order to
  250. recover consistency within the file system.
  251.  
  252. Under FAT or HPFS, if a sector that is the location of one of the file
  253. system's special objects fails, then a single sector failure will
  254. occur. NTFS avoids this in two ways: first, by not using special
  255. objects on the disk and tracking and protecting all objects that are
  256. on the disk. Secondly, under NTFS, multiple copies (the number depends
  257. on the volume size) of the Master File Table are kept.
  258.  
  259. Similar to OS/2 versions of HPFS, NTFS supports hot fixing.
  260.  
  261. Added Functionality
  262. -------------------
  263.  
  264. One of the major design goals of Windows NT at every level is to
  265. provide a platform that can be added to and built upon, and NTFS is no
  266. exception. NTFS provides a rich and flexible platform for other file
  267. systems to be able to use. In addition, NTFS fully supports the
  268. Windows NT security model and supports multiple data streams. No
  269. longer is a data file a single stream of data. Finally, under NTFS, a
  270. user can add his or her own user-defined attributes to a file.
  271.  
  272. POSIX Support
  273. -------------
  274.  
  275. NTFS is the most POSIX.1 compliant of the supported file systems
  276. because it supports the following POSIX.1 requirements:
  277.  
  278. Case Sensitive Naming:
  279.  
  280. Under POSIX, README.TXT, Readme.txt, and readme.txt are all
  281. different files.
  282.  
  283. Additional Time Stamp:
  284.  
  285. The additional time stamp supplies the time at which the file was last
  286. accessed.
  287.  
  288. Hard Links:
  289.  
  290. A hard link is when two different filenames, which can be located in
  291. different directories, point to the same data.
  292.  
  293. Removing Limitations
  294. --------------------
  295.  
  296. First, NTFS has greatly increased the size of files and volumes, so
  297. that they can now be up to 264. NTFS has also returned to the FAT
  298. concept of clusters in order to avoid HPFS problem of a fixed sector
  299. size. This was done because Windows NT is a portable operating system
  300. and different disk technology is likely to be encountered at some
  301. point. Therefore, 512 bytes per sector was viewed as having a large
  302. possibility of not always being a good fit for the allocation. This
  303. was accomplished by allowing the cluster to be defined as multiples of
  304. the hardware's natural allocation size (see Cluster Factor in the NTFS
  305. module for more details). Finally, in NTFS all filenames are Unicode
  306. based, and 8.3 filenames are kept along with long filenames.
  307.  
  308. Advantages of NTFS
  309. ------------------
  310.  
  311. NTFS is best for use on volumes of about 400 MB or more. This is
  312. because performance does not degrade under NTFS, as it does under FAT,
  313. with larger volume sizes.
  314.  
  315. The recoverability designed into NTFS is such that a user should
  316. never have to run any sort of disk repair utility on an NTFS
  317. partition. For additional advantages of NTFS, see the following: 
  318.  
  319.  - Windows NT "System Guide," Chapter 18, section titled "Selecting a 
  320.    File System for the Windows NT Partition" 
  321.  
  322.  - Windows NT Advanced Server "System Guide," Chapter 20, section
  323.    titled "Selecting a File System for the Windows NT Partition" 
  324.  
  325.  - Windows NT Advanced Server "Concepts and Planning Guide," Chapter
  326.    5, section titled "Choosing a File System" 
  327.  
  328. Disadvantages of NTFS
  329. ---------------------
  330.  
  331. It is not recommended to use NTFS on a volume that is smaller than
  332. approximately 400 MB, because of the amount of space overhead involved
  333. in NTFS. This space overhead is in the form of NTFS system files that
  334. typically use at least 4 MB of drive space on a 100 MB partition.
  335.  
  336. Currently, there is no file encryption built into NTFS. Therefore,
  337. someone can boot under MS-DOS, or another operating system, and use
  338. a low-level disk editing utility to view data stored on an NTFS
  339. volume.
  340.  
  341. It is not possible to format a floppy disk with the NTFS file system;
  342. Windows NT formats all floppy disks with the FAT file system because
  343. the overhead involved in NTFS will not fit onto a floppy disk.
  344.  
  345. For further discussion of NTFS disadvantages, see the following:
  346.  
  347.  - Windows NT "System Guide," Chapter 19, section titled "Selecting a
  348.    File System for the Windows NT Partition"
  349.  
  350.  - Windows NT Advanced Server "System Guide," Chapter 21, section
  351.    titled "Selecting a File System for the Windows NT Partition" 
  352.  
  353.  - Windows NT Advanced Server "Concepts and Planning Guide," Chapter
  354.    5, section titled "Choosing a File System" 
  355.  
  356. NTFS Naming Conventions
  357. -----------------------
  358.  
  359. File and directory names can be up to 255 characters long, including
  360. any extensions. Names preserve case, but are not case sensitive. NTFS
  361. makes no distinction of filenames based on case. Names can contain any
  362. characters except for the following:
  363.  
  364.    ?  "  /  \  <  >  *  |  :
  365.  
  366. Note: Currently, from the command line, you can only create filenames
  367. of up to 253 characters. 
  368.  
  369. Additional reference words: 3.10
  370.  
  371. =============================================================================
  372.  
  373. THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
  374. PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS
  375. ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES
  376. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  377. EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR
  378. ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
  379. CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF
  380. MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
  381. POSSIBILITY OF SUCH DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION
  382. OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES
  383. SO THE FOREGOING LIMITATION MAY NOT APPLY.
  384.  
  385. Copyright Microsoft Corporation 1993.